package cn.edu.cqu.newslab.ioc.bfpp;

import org.springframework.beans.factory.config.BeanFactoryPostProcessor;
import org.springframework.beans.factory.config.ConfigurableListableBeanFactory;
import org.springframework.beans.factory.xml.XmlBeanFactory;
import org.springframework.core.io.ClassPathResource;

public class PropertyConfigurerDemo {

	/**
	 * @Title: main
	 * @Description: TODO(这里用一句话描述这个方法的作用)
	 * @param @param args    设定文件
	 * @return void    返回类型
	 * @throws
	 */
	public static void main(String[] args) {
		ConfigurableListableBeanFactory factory = new XmlBeanFactory(new ClassPathResource( "/cn/edu/cqu/newslab/ioc/bfpp/bfpp-context.xml"));
		BeanFactoryPostProcessor bfpp = (BeanFactoryPostProcessor)factory.getBean("bfpp");
		bfpp.postProcessBeanFactory(factory);
		System.out.println(factory.getBean("simpleBean"));
	}

}
